package edu.hit.crawler.mapred;

import org.apache.hadoop.io.FloatWritable;
import org.apache.hadoop.io.WritableComparator;

public class DecComparator extends WritableComparator {

	
	private static final FloatWritable.Comparator FLOAT_COMPARATOR = 
			new FloatWritable.Comparator();
	protected DecComparator() {
		super(FloatWritable.class);
	}
	@Override
	public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
		return -FLOAT_COMPARATOR.compare(b1, s1, l1, b2, s2, l2);
	}

}
